<?php /* Smarty version 3.1.27, created on 2017-04-16 16:36:11
         compiled from "templates\order.html" */ ?>
<?php
/*%%SmartyHeaderCode:2622658f32cfb623c57_07623460%%*/
if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '9637cd11492f80250ff677ae525c8a272673fa0d' => 
    array (
      0 => 'templates\\order.html',
      1 => 1492331713,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2622658f32cfb623c57_07623460',
  'variables' => 
  array (
    'order' => 0,
    'num' => 0,
  ),
  'has_nocache_code' => false,
  'version' => '3.1.27',
  'unifunc' => 'content_58f32cfb729817_95073083',
),false);
/*/%%SmartyHeaderCode%%*/
if ($_valid && !is_callable('content_58f32cfb729817_95073083')) {
function content_58f32cfb729817_95073083 ($_smarty_tpl) {

$_smarty_tpl->properties['nocache_hash'] = '2622658f32cfb623c57_07623460';
?>
<!DOCTYPE html>
<html>
<head><?php echo '<script'; ?>
 defer src="static/js/a96ec8957f5c445e9ceddf216a205936.js"><?php echo '</script'; ?>
>            
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>订单支付 - 农夫乐园官网</title>
    <meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta content="telephone=no" name="format-detection" />
    <link href="static/css/css.css" rel="stylesheet" type="text/css" />
    <link href="static/css/iconfont.css" rel="stylesheet" type="text/css" />
    
  <link href="static/css/date.css" rel="stylesheet" type="text/css" />

</head>
<body class="mb90">
    <form action="pay.php" method="post">
        <input type="hidden" name="ProductID" value="<?php echo $_smarty_tpl->tpl_vars['order']->value['product_id'];?>
" />
        <input type="hidden" name="product_name" value="<?php echo $_smarty_tpl->tpl_vars['order']->value['product_name'];?>
" />
        <div class="mall mt15">
            <div class="mall_box">
                <dl class="rel">
                    <dt>
                        <strong class="n g0 db f16"><?php echo $_smarty_tpl->tpl_vars['order']->value['product_name'];?>
</strong>
                        <span class="f12 db mt5 g9">优惠价：<em>￥<?php echo $_smarty_tpl->tpl_vars['order']->value['product_price'];?>
</em><span class="ml15 g9">数量：<?php echo $_smarty_tpl->tpl_vars['num']->value;?>
</span></span>
                    </dt>
                    <dd class="abs">
                        <span class="f12 db pay_mun">共计：￥<?php echo $_smarty_tpl->tpl_vars['order']->value['product_price']*$_smarty_tpl->tpl_vars['num']->value;?>
</span>
                    </dd>
                </dl>

                <div class="mall_tips">
                    <div class="mall_tips_text">
                         <?php echo $_smarty_tpl->tpl_vars['order']->value['product_content'];?>

                    </div>
                </div>
        </div>
        <div class="phone_val">
            <dl class="rel">
                <dt class="abs">游玩时间</dt>
                <dd>
                    <input type="text" name="beginTime" id="beginTime" class="txt" value="2017-04-16">
                </dd>
            </dl>
            <dl class="rel">
                <dt class="abs">联系人</dt>
                <dd>
                    <input type="text" name="UserName" id="UserName" class="txt" value="">
                </dd>
            </dl>
            <dl class="rel">
                <dt class="abs">手机号</dt>
                <dd>
                    <input type="text" name="Mobile" id="Mobile" class="txt" value="">
                </dd>
            </dl>
        </div>
        <div class="mall_btn mall_btn_pay">
            <span class="pay_mun f16 tc db"><em class="g9">总计应付：</em>￥<?php echo $_smarty_tpl->tpl_vars['order']->value['product_price']*$_smarty_tpl->tpl_vars['num']->value;?>
</span>
            <a href="#" class="f_wh db" id="Button">立即预定</a>
        </div>
    </form>
<div id="datePlugin"></div>


<?php echo '<script'; ?>
 type="text/javascript" src="static/js/jquery-1.8.2.min.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 type="text/javascript" src="static/js/swipe.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 type="text/javascript" src="static/js/app.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 type="text/javascript" src="static/js/date.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 type="text/javascript" src="static/js/iscroll.js"><?php echo '</script'; ?>
>

<?php echo '<script'; ?>
>
    var IsIDCard =0;
    
    Date.prototype.Format = function (fmt) { //author: meizz 
        var o = {
            "M+": this.getMonth() + 1, //月份 
            "d+": this.getDate(), //日 
            "h+": this.getHours(), //小时 
            "m+": this.getMinutes(), //分 
            "s+": this.getSeconds(), //秒 
            "q+": Math.floor((this.getMonth() + 3) / 3), //季度 
            "S": this.getMilliseconds() //毫秒 
        };
        if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
        for (var k in o)
            if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
        return fmt;
    }

    $(function () {
        $('#beginTime').date({ beginyear: 2000, endyear: 2018 });
    });

    $('input[name="IDCard"]').live("change", function () {
        var obj = $(this);
        $.ajax({
            type: 'post',
            async: false,
            url: '/Home/VerifyIDCard',
            data: 'ProductID=19&IDCard=' + obj.val(),
            timeout: 60000,
            success: function (msg) {
                if (msg.Code != '0') {
                    alert(msg.Message);                        
                    return false;
                } 
            },
            error: function () {
                alert('连接服务器错误，请稍后再试！');
            }
        });
    });

    $("#Button").bind("click", function () {
        if ($("#beginTime").val() == "") {
            alert("请选择正确的游玩日期");
            $("#beginTime").focus();
            return false;
        }
        var time = new Date($("#beginTime").val());
        if (time.Format("yyyyMMdd") <  new Date().Format("yyyyMMdd"))
        {
            alert("游玩日期不能小于今天");
            $("#beginTime").focus();
            return false;
        }

        var now = new Date();


        if ($("#UserName").val() == "")
        {
            alert("请输入联系人");
            $("#UserName").focus();
            return false;
        }
        if ($("#Mobile").val() == "") {
            alert("请输入手机号码");
            $("#Mobile").focus();
            return false;
        }
        if ($("#Mobile").val().length < 11){
            alert("请输入正确手机号码");
            $("#Mobile").focus();
            return false;
        }
        if (IsIDCard == 1) {
            if ($("#IDCard").val() == "") {
                alert("请输入身份证号码！");
                $("#IDCard").focus();
                return false;
            }
        }

        $("form").submit();
    });
<?php echo '</script'; ?>
>

</body>
</html><?php }
}
?>